package com.itheima.test22;

import com.itheima.test21.Student;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.ArrayList;

/*
题目二
	请定义main()方法，创建一个反序列化对象：ObjectInputStream，将文件”test5_1.txt”的对象反序列化到程序中，并打印此对象。
 */
public class Test22 {
    public static void main(String[] args) throws IOException, ClassNotFoundException {
        ObjectInputStream ois = new ObjectInputStream(new FileInputStream("D:\\IdeaProjects\\studentManagerSystem\\homewrok0919\\src\\com\\itheima\\test5_1.txt"));
        Object o = ois.readObject();

        Student student = (Student) o;
        System.out.println(student);
    }
}
